package com.sugar.persistence.oa.hr;

import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.stereotype.Controller;

import com.sugar.base.core.IHibernateBaseDaoSupport;
import com.sugar.base.query.PageModel;
import com.sugar.domain.oa.hr.Organization;

@Controller
public class OrganizationDaoBean extends IHibernateBaseDaoSupport<Organization> implements IOrganization {
	
	@Override
	public void deleteOrgDao(Organization org) {
		this.deleteEntityBaseDao(org) ;
	}

	@Override
	public List<Organization> findOrgDao(String queryString, String whereStr,
			Object[] param, LinkedHashMap<String, String> orderby)
			throws RuntimeException {
	
		return this.findMoreEntityByParam(queryString, whereStr, param, orderby) ;
	}

	@Override
	public PageModel<Organization> getScorllOrgDao(String queryString,
			String whereStr, Object[] param, int firstPage, int pageSize,
			LinkedHashMap<String, String> orderby) {
	
		return this.getScrollRecord(queryString, whereStr, param, firstPage, pageSize, orderby);
	}

	@Override
	public Organization loadOrgByIdDao(String id) {
	
		return this.loadEntityById(Organization.class, id) ;
	}

	@Override
	public void saveOrgDao(Organization org) {
		this.saveEntityBaseDao(org) ;
	}

	@Override
	public void updateOrgDao(Organization org) {
		this.updateEntityBaseDao(org) ;
	}

	@Override
	public void deleteSelectOrgDao(Object[] ids)
			throws RuntimeException {
		this.deleteEntityMoreIdBaseDao(Organization.class, ids) ;
	}

}
